package com.ruoyi.wisdom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wisdom.mapper.IotSchoolClassesRelationMapper;
import com.ruoyi.wisdom.domain.IotSchoolClassesRelation;
import com.ruoyi.wisdom.service.IIotSchoolClassesRelationService;

/**
 * 班级关系管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-31
 */
@Service
public class IotSchoolClassesRelationServiceImpl implements IIotSchoolClassesRelationService 
{
    @Autowired
    private IotSchoolClassesRelationMapper iotSchoolClassesRelationMapper;

    /**
     * 查询班级关系管理
     * 
     * @param id 班级关系管理主键
     * @return 班级关系管理
     */
    @Override
    public IotSchoolClassesRelation selectIotSchoolClassesRelationById(Long id)
    {
        return iotSchoolClassesRelationMapper.selectIotSchoolClassesRelationById(id);
    }

    /**
     * 查询班级关系管理列表
     * 
     * @param iotSchoolClassesRelation 班级关系管理
     * @return 班级关系管理
     */
    @Override
    public List<IotSchoolClassesRelation> selectIotSchoolClassesRelationList(IotSchoolClassesRelation iotSchoolClassesRelation)
    {
        return iotSchoolClassesRelationMapper.selectIotSchoolClassesRelationList(iotSchoolClassesRelation);
    }

    /**
     * 新增班级关系管理
     * 
     * @param iotSchoolClassesRelation 班级关系管理
     * @return 结果
     */
    @Override
    public int insertIotSchoolClassesRelation(IotSchoolClassesRelation iotSchoolClassesRelation)
    {
        iotSchoolClassesRelation.setCreateTime(DateUtils.getNowDate());
        return iotSchoolClassesRelationMapper.insertIotSchoolClassesRelation(iotSchoolClassesRelation);
    }

    /**
     * 修改班级关系管理
     * 
     * @param iotSchoolClassesRelation 班级关系管理
     * @return 结果
     */
    @Override
    public int updateIotSchoolClassesRelation(IotSchoolClassesRelation iotSchoolClassesRelation)
    {
        iotSchoolClassesRelation.setUpdateTime(DateUtils.getNowDate());
        return iotSchoolClassesRelationMapper.updateIotSchoolClassesRelation(iotSchoolClassesRelation);
    }

    /**
     * 批量删除班级关系管理
     * 
     * @param ids 需要删除的班级关系管理主键
     * @return 结果
     */
    @Override
    public int deleteIotSchoolClassesRelationByIds(Long[] ids)
    {
        return iotSchoolClassesRelationMapper.deleteIotSchoolClassesRelationByIds(ids);
    }

    /**
     * 删除班级关系管理信息
     * 
     * @param id 班级关系管理主键
     * @return 结果
     */
    @Override
    public int deleteIotSchoolClassesRelationById(Long id)
    {
        return iotSchoolClassesRelationMapper.deleteIotSchoolClassesRelationById(id);
    }
}
